<template>
    <div>
        <el-row :gutter="15">
			<el-form ref="elForm" :model="dataForm" :rules="rules" size="medium" label-width="150px" label-position="right" :disabled="setting.readonly">
				<el-col :span="12" v-if="JudgeShow('zyzmc')">
					<el-form-item label="作业证名称" prop="zyzmc" >
						<el-input v-model="dataForm.zyzmc"  :disabled ="JudgeWrite('zyzmc')"  placeholder="请输入" clearable :style='{"width":"100%"}' >
							<template slot="prepend"></template>
							<template slot="append"></template>
						</el-input>
					</el-form-item>
				</el-col>
				<el-col :span="12" v-if="JudgeShow('zyzbh')">
					<el-form-item label="作业证编号" prop="zyzbh" >
						<el-input v-model="dataForm.zyzbh"  :disabled ="JudgeWrite('zyzbh')"  placeholder="系统自动生成" readonly >
						</el-input>
					</el-form-item>
				</el-col>
				<el-col :span="12" v-if="JudgeShow('sqdw')">
					<el-form-item label="申请单位" prop="sqdw" >
						<el-select v-model="dataForm.sqdw" @change="person"  placeholder="请选择" clearable :style='{"width":"100%"}' filterable >
							<el-option v-for="(item, index) in sqdwOptions" :key="index" :label="item.F_FullName" :value="item.F_Id" ></el-option>
						</el-select>
					</el-form-item>
				</el-col>
				<el-col :span="12" v-if="JudgeShow('sqr')">
					<el-form-item label="申请人" prop="sqr" >
						<!-- <el-select v-model="dataForm.sqr"  :disabled ="JudgeWrite('sqr')"  placeholder="请选择" clearable :style='{"width":"100%"}' filterable >
							<el-option v-for="(item, index) in sqrOptions" :key="index" :label="item.F_RealName" :value="item.F_Id" ></el-option>
						</el-select> -->
						<el-select v-model="dataForm.sqr" :disabled ="JudgeWrite('sqr')" placeholder="请选择" clearable :style='{"width":"100%"}' filterable>
							<el-option v-for="(item, index) in personAll" :key="index" :label="item.realName" :value="item.id" ></el-option>
						</el-select>
					</el-form-item>
				</el-col>
				<el-col :span="12" v-if="JudgeShow('zykssj')">
					<el-form-item label="作业开始时间" prop="zykssj" >
						<el-date-picker v-model="dataForm.zykssj"  :disabled ="JudgeWrite('zykssj')"  placeholder="请选择" clearable :style='{"width":"100%"}' type="datetime" format="yyyy-MM-dd HH:mm:ss" value-format="timestamp" >
						</el-date-picker>
					</el-form-item>
				</el-col>
				<el-col :span="12" v-if="JudgeShow('zyjssj')">
					<el-form-item label="作业结束时间" prop="zyjssj" >
						<el-date-picker v-model="dataForm.zyjssj"  :disabled ="JudgeWrite('zyjssj')"  placeholder="请选择" clearable :style='{"width":"100%"}' type="datetime" format="yyyy-MM-dd HH:mm:ss" value-format="timestamp" >
						</el-date-picker>
					</el-form-item>
				</el-col>
				<el-col :span="12" v-if="JudgeShow('zydd')">
					<el-form-item label="作业地点" prop="zydd" >
						<el-input v-model="dataForm.zydd"  :disabled ="JudgeWrite('zydd')"  placeholder="请输入" clearable :style='{"width":"100%"}' >
							<template slot="prepend"></template>
							<template slot="append"></template>
						</el-input>
					</el-form-item>
				</el-col>
				<el-col :span="12" v-if="JudgeShow('zydw')">
					<el-form-item label="作业单位" prop="zydw" >
						<el-select v-model="dataForm.zydw"  :disabled ="JudgeWrite('zydw')"  placeholder="请选择" clearable :style='{"width":"100%"}' filterable >
							<el-option v-for="(item, index) in zydwOptions" :key="index" :label="item.F_FullName" :value="item.F_Id" ></el-option>
						</el-select>
					</el-form-item>
				</el-col>
				<el-col :span="12" v-if="JudgeShow('jhr')">
					<el-form-item label="监护人" prop="jhr" >
						<el-select v-model="dataForm.jhr"  :disabled ="JudgeWrite('jhr')"  placeholder="请选择" clearable :style='{"width":"100%"}' filterable >
							<el-option v-for="(item, index) in jhrOptions" :key="index" :label="item.F_RealName" :value="item.F_Id" ></el-option>
						</el-select>
					</el-form-item>
				</el-col>
				<el-col :span="12" v-if="JudgeShow('sjdqttszy')">
					<el-form-item label="涉及其他特殊作业" prop="sjdqttszy" >
						<el-input v-model="dataForm.sjdqttszy"  :disabled ="JudgeWrite('sjdqttszy')"  placeholder="请输入" clearable :style='{"width":"100%"}' >
							<template slot="prepend"></template>
							<template slot="append"></template>
						</el-input>
					</el-form-item>
				</el-col>
				<el-col :span="12" v-if="JudgeShow('sqrq')">
					<el-form-item label="申请日期" prop="sqrq" >
						<el-date-picker v-model="dataForm.sqrq"  :disabled ="JudgeWrite('sqrq')"  placeholder="请选择" clearable :style='{"width":"100%"}' type="date" format="yyyy-MM-dd" value-format="timestamp" >
						</el-date-picker>
					</el-form-item>
				</el-col>
				<el-col :span="24" v-if="JudgeShow('whbs')">
					<el-form-item label="危害辨识" prop="whbs" >
						<el-input v-model="dataForm.whbs"  :disabled ="JudgeWrite('whbs')"  placeholder="请输入" show-word-limit :style='{"width":"100%"}' type="textarea" :autosize='{"minRows":4,"maxRows":100}' >
						</el-input>
					</el-form-item>
				</el-col>
				<el-col :span="24" v-if="JudgeShow('zyfwnrfs')">
					<el-form-item label="作业范围内容方式" prop="zyfwnrfs" >
						<el-input v-model="dataForm.zyfwnrfs"  :disabled ="JudgeWrite('zyfwnrfs')"  placeholder="请输入" show-word-limit :style='{"width":"100%"}' type="textarea" :autosize='{"minRows":4,"maxRows":4}' >
						</el-input>
					</el-form-item>
				</el-col>
				<el-col :span="12" v-if="JudgeShow('sjdqttszyqz')">
					<el-form-item label="签字" prop="sjdqttszyqz" >
						<el-select v-model="dataForm.sjdqttszyqz"  :disabled ="JudgeWrite('sjdqttszyqz')"  placeholder="请选择" clearable :style='{"width":"100%"}' filterable >
							<el-option v-for="(item, index) in sjdqttszyqzOptions" :key="index" :label="item.F_RealName" :value="item.F_Id" ></el-option>
						</el-select>
					</el-form-item>
				</el-col>
				<el-col :span="12" v-if="JudgeShow('sjdqttszyqzrq')">
					<el-form-item label="日期" prop="sjdqttszyqzrq" >
						<el-date-picker v-model="dataForm.sjdqttszyqzrq"  :disabled ="JudgeWrite('sjdqttszyqzrq')"  placeholder="请选择" clearable :style='{"width":"100%"}' type="date" format="yyyy-MM-dd" value-format="timestamp" >
						</el-date-picker>
					</el-form-item>
				</el-col>
				<el-col :span="12" v-if="JudgeShow('aqcsqrr')">
					<el-form-item label="安全措施确认人" prop="aqcsqrr" >
						<el-select v-model="dataForm.aqcsqrr"  :disabled ="JudgeWrite('aqcsqrr')"  placeholder="请选择" clearable :style='{"width":"100%"}' filterable >
							<el-option v-for="(item, index) in aqcsqrrOptions" :key="index" :label="item.F_RealName" :value="item.F_Id" ></el-option>
						</el-select>
					</el-form-item>
				</el-col>
				<el-col :span="12" v-if="JudgeShow('bzr')">
					<el-form-item label="其他安全措施编制人" prop="bzr" >
						<el-select v-model="dataForm.bzr"  :disabled ="JudgeWrite('bzr')"  placeholder="请选择" clearable :style='{"width":"100%"}' filterable >
							<el-option v-for="(item, index) in bzrOptions" :key="index" :label="item.F_RealName" :value="item.F_Id" ></el-option>
						</el-select>
					</el-form-item>
				</el-col>
				<el-col :span="24" v-if="JudgeShow('qtaqcs')">
					<el-form-item label="其他安全措施" prop="qtaqcs" >
						<el-input v-model="dataForm.qtaqcs"  :disabled ="JudgeWrite('qtaqcs')"  placeholder="请输入" show-word-limit :style='{"width":"100%"}' type="textarea" :autosize='{"minRows":4,"maxRows":100}' >
						</el-input>
					</el-form-item>
				</el-col>
				<el-col :span="12" v-if="JudgeShow('qrr')">
					<el-form-item label="其他安全措施确认人" prop="qrr" >
						<el-select v-model="dataForm.qrr"  :disabled ="JudgeWrite('qrr')"  placeholder="请选择" clearable :style='{"width":"100%"}' filterable >
							<el-option v-for="(item, index) in qrrOptions" :key="index" :label="item.F_RealName" :value="item.F_Id" ></el-option>
						</el-select>
					</el-form-item>
				</el-col>
				<el-col :span="12" v-if="JudgeShow('ssaqjyr')">
					<el-form-item label="实施安全教育人" prop="ssaqjyr" >
						<el-select v-model="dataForm.ssaqjyr"  :disabled ="JudgeWrite('ssaqjyr')"  placeholder="请选择" clearable :style='{"width":"100%"}' filterable >
							<el-option v-for="(item, index) in ssaqjyrOptions" :key="index" :label="item.F_RealName" :value="item.F_Id" ></el-option>
						</el-select>
					</el-form-item>
				</el-col>
				<el-col :span="24" v-if="JudgeShow('sqdwyj')">
					<el-form-item label="申请单位意见" prop="sqdwyj" >
						<el-input v-model="dataForm.sqdwyj"  :disabled ="JudgeWrite('sqdwyj')"  placeholder="请输入" show-word-limit :style='{"width":"100%"}' type="textarea" :autosize='{"minRows":4,"maxRows":100}' >
						</el-input>
					</el-form-item>
				</el-col>
				<el-col :span="12" v-if="JudgeShow('sqdwqz')">
					<el-form-item label="申请单位签字" prop="sqdwqz" >
						<el-select v-model="dataForm.sqdwqz"  :disabled ="JudgeWrite('sqdwqz')"  placeholder="请选择" clearable :style='{"width":"100%"}' filterable >
							<el-option v-for="(item, index) in sqdwqzOptions" :key="index" :label="item.F_RealName" :value="item.F_Id" ></el-option>
						</el-select>
					</el-form-item>
				</el-col>
				<el-col :span="12" v-if="JudgeShow('sqdwqzrq')">
					<el-form-item label="申请单位签字日期" prop="sqdwqzrq" >
						<el-date-picker v-model="dataForm.sqdwqzrq"  :disabled ="JudgeWrite('sqdwqzrq')"  placeholder="请选择" clearable :style='{"width":"100%"}' type="datetime" format="yyyy-MM-dd HH:mm:ss" value-format="timestamp" >
						</el-date-picker>
					</el-form-item>
				</el-col>
				<el-col :span="24" v-if="JudgeShow('spbmyj')">
					<el-form-item label="审批部门意见" prop="spbmyj" >
						<el-input v-model="dataForm.spbmyj"  :disabled ="JudgeWrite('spbmyj')"  placeholder="请输入" show-word-limit :style='{"width":"100%"}' type="textarea" :autosize='{"minRows":4,"maxRows":100}' >
						</el-input>
					</el-form-item>
				</el-col>
				<el-col :span="12" v-if="JudgeShow('spbmqz')">
					<el-form-item label="审批部门签字" prop="spbmqz" >
						<el-select v-model="dataForm.spbmqz"  :disabled ="JudgeWrite('spbmqz')"  placeholder="请选择" clearable :style='{"width":"100%"}' filterable >
							<el-option v-for="(item, index) in spbmqzOptions" :key="index" :label="item.F_RealName" :value="item.F_Id" ></el-option>
						</el-select>
					</el-form-item>
				</el-col>
				<el-col :span="12" v-if="JudgeShow('sprq')">
					<el-form-item label="审批日期" prop="sprq" >
						<el-date-picker v-model="dataForm.sprq"  :disabled ="JudgeWrite('sprq')"  placeholder="请选择" clearable :style='{"width":"100%"}' type="datetime" format="yyyy-MM-dd HH:mm:ss" value-format="timestamp" >
						</el-date-picker>
					</el-form-item>
				</el-col>
				<el-col :span="24" v-if="JudgeShow('wgys')">
					<el-form-item label="完工验收" prop="wgys" >
						<el-input v-model="dataForm.wgys"  :disabled ="JudgeWrite('wgys')"  placeholder="请输入" show-word-limit :style='{"width":"100%"}' type="textarea" :autosize='{"minRows":4,"maxRows":100}' >
						</el-input>
					</el-form-item>
				</el-col>
				<el-col :span="12" v-if="JudgeShow('wgysqz')">
					<el-form-item label="完工验收签字" prop="wgysqz" >
						<el-select v-model="dataForm.wgysqz"  :disabled ="JudgeWrite('wgysqz')"  placeholder="请选择" clearable :style='{"width":"100%"}' filterable >
							<el-option v-for="(item, index) in wgysqzOptions" :key="index" :label="item.F_RealName" :value="item.F_Id" ></el-option>
						</el-select>
					</el-form-item>
				</el-col>
				<el-col :span="12" v-if="JudgeShow('wgysrq')">
					<el-form-item label="完工验收日期" prop="wgysrq" >
						<el-date-picker v-model="dataForm.wgysrq"  :disabled ="JudgeWrite('wgysrq')"  placeholder="请选择" clearable :style='{"width":"100%"}' type="datetime" format="yyyy-MM-dd HH:mm:ss" value-format="timestamp" >
						</el-date-picker>
					</el-form-item>
				</el-col>
				<el-col :span="24" v-if="JudgeShow('zydwyj')">
					<el-form-item label="作业单位意见" prop="zydwyj" >
						<el-input v-model="dataForm.zydwyj"  :disabled ="JudgeWrite('zydwyj')"  placeholder="请输入" show-word-limit :style='{"width":"100%"}' type="textarea" :autosize='{"minRows":4,"maxRows":100}' >
						</el-input>
					</el-form-item>
				</el-col>
				<el-col :span="12" v-if="JudgeShow('zydwyjqz')">
					<el-form-item label="作业单位签字" prop="zydwyjqz" >
						<el-select v-model="dataForm.zydwyjqz"  :disabled ="JudgeWrite('zydwyjqz')"  placeholder="请选择" clearable :style='{"width":"100%"}' filterable >
							<el-option v-for="(item, index) in zydwyjqzOptions" :key="index" :label="item.F_RealName" :value="item.F_Id" ></el-option>
						</el-select>
					</el-form-item>
				</el-col>
				<el-col :span="12" v-if="JudgeShow('zydwyjqzrq')">
					<el-form-item label="作业单位签字日期" prop="zydwyjqzrq" >
						<el-date-picker v-model="dataForm.zydwyjqzrq"  :disabled ="JudgeWrite('zydwyjqzrq')"  placeholder="请选择" clearable :style='{"width":"100%"}' type="datetime" format="yyyy-MM-dd HH:mm:ss" value-format="timestamp" >
						</el-date-picker>
					</el-form-item>
				</el-col>
				<el-col :span="24" v-if="JudgeShow('sdyj')">
					<el-form-item label="安全等部门会签意见" prop="sdyj" >
						<el-input v-model="dataForm.sdyj"  :disabled ="JudgeWrite('sdyj')"  placeholder="请输入" show-word-limit :style='{"width":"100%"}' type="textarea" :autosize='{"minRows":4,"maxRows":100}' >
						</el-input>
					</el-form-item>
				</el-col>
				<el-col :span="12" v-if="JudgeShow('sdqz')">
					<el-form-item label="安全等部门会签字" prop="sdqz" >
						<el-select v-model="dataForm.sdqz"  :disabled ="JudgeWrite('sdqz')"  placeholder="请选择" clearable :style='{"width":"100%"}' filterable >
							<el-option v-for="(item, index) in sdqzOptions" :key="index" :label="item.F_RealName" :value="item.F_Id" ></el-option>
						</el-select>
					</el-form-item>
				</el-col>
				<el-col :span="12" v-if="JudgeShow('sddate')">
					<el-form-item label="安全等部门会签日期" prop="sddate" >
						<el-date-picker v-model="dataForm.sddate"  :disabled ="JudgeWrite('sddate')"  placeholder="请选择" clearable :style='{"width":"100%"}' type="datetime" format="yyyy-MM-dd HH:mm:ss" value-format="timestamp" >
						</el-date-picker>
					</el-form-item>
				</el-col>
			</el-form>

        </el-row>
        <UserBox v-if="userBoxVisible" ref="userBox" @submit="submit" />
    </div>
</template>
<script>
    import request from '@/utils/request'
    import { previewDataInterface } from '@/api/systemData/dataInterface'
    import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
    import {departmentPerson}from '@/api/systemIntegration/recard'

    export default {
        components: {},
        props: [],
        data() {
            return {
							  personAll:[], // 申请人
                visible: false,
                setting: {},
                eventType: '',
                userBoxVisible: false,
                dataForm: {
                    id:'',                    
					flowId: '',
					actionType:1,
					freeApproverUserId: '',
					zyzmc:undefined,
					sqdw:undefined,
					sqr:undefined,
					zyzbh:undefined,
					zykssj:undefined,
					zyjssj:undefined,
					zydd:undefined,
					zydw:undefined,
					jhr:undefined,
					sjdqttszy:undefined,
					sqrq:undefined,
					whbs:undefined,
					zyfwnrfs:undefined,
					sjdqttszyqz:undefined,
					sjdqttszyqzrq:undefined,
					aqcsqrr:undefined,
					bzr:undefined,
					qtaqcs:undefined,
					qrr:undefined,
					ssaqjyr:undefined,
					sqdwyj:undefined,
					sqdwqz:undefined,
					sqdwqzrq:undefined,
					spbmyj:undefined,
					spbmqz:undefined,
					sprq:undefined,
					wgys:undefined,
					wgysqz:undefined,
					wgysrq:undefined,
					zydwyj:undefined,
					zydwyjqz:undefined,
					zydwyjqzrq:undefined,
					sdyj:undefined,
					sdqz:undefined,
					sddate:undefined,

                },
                rules: {

                },
				sqdwOptions:[],
				sqrOptions:[],
				zydwOptions:[],
				jhrOptions:[],
				sjdqttszyqzOptions:[],
				aqcsqrrOptions:[],
				bzrOptions:[],
				qrrOptions:[],
				ssaqjyrOptions:[],
				sqdwqzOptions:[],
				spbmqzOptions:[],
				wgysqzOptions:[],
				zydwyjqzOptions:[],
				sdqzOptions:[],


            }
        },
        computed: {},
        watch: {},
        created() {
		this.getsqdwOptions();
		this.getsqrOptions();
		this.getzydwOptions();
		this.getjhrOptions();
		this.getsjdqttszyqzOptions();
		this.getaqcsqrrOptions();
		this.getbzrOptions();
		this.getqrrOptions();
		this.getssaqjyrOptions();
		this.getsqdwqzOptions();
		this.getspbmqzOptions();
		this.getwgysqzOptions();
		this.getzydwyjqzOptions();
		this.getsdqzOptions();

        },
        mounted() { 
					this.dtaqzyz()
				},
        methods: {
		getsqdwOptions()
		{
			previewDataInterface('772d2cbcadd24df79243e3d92ef5f690').then(res => {
				this.sqdwOptions = res.data
			})
		},
		getsqrOptions()
		{
			previewDataInterface('8bca424f16d6448ab09e57a028853aa9').then(res => {
				this.sqrOptions = res.data
			})
		},
		getzydwOptions()
		{
			previewDataInterface('772d2cbcadd24df79243e3d92ef5f690').then(res => {
				this.zydwOptions = res.data
			})
		},
		getjhrOptions()
		{
			previewDataInterface('8bca424f16d6448ab09e57a028853aa9').then(res => {
				this.jhrOptions = res.data
			})
		},
		getsjdqttszyqzOptions()
		{
			previewDataInterface('8bca424f16d6448ab09e57a028853aa9').then(res => {
				this.sjdqttszyqzOptions = res.data
			})
		},
		getaqcsqrrOptions()
		{
			previewDataInterface('8bca424f16d6448ab09e57a028853aa9').then(res => {
				this.aqcsqrrOptions = res.data
			})
		},
		getbzrOptions()
		{
			previewDataInterface('8bca424f16d6448ab09e57a028853aa9').then(res => {
				this.bzrOptions = res.data
			})
		},
		getqrrOptions()
		{
			previewDataInterface('8bca424f16d6448ab09e57a028853aa9').then(res => {
				this.qrrOptions = res.data
			})
		},
		getssaqjyrOptions()
		{
			previewDataInterface('8bca424f16d6448ab09e57a028853aa9').then(res => {
				this.ssaqjyrOptions = res.data
			})
		},
		getsqdwqzOptions()
		{
			previewDataInterface('8bca424f16d6448ab09e57a028853aa9').then(res => {
				this.sqdwqzOptions = res.data
			})
		},
		getspbmqzOptions()
		{
			previewDataInterface('8bca424f16d6448ab09e57a028853aa9').then(res => {
				this.spbmqzOptions = res.data
			})
		},
		getwgysqzOptions()
		{
			previewDataInterface('8bca424f16d6448ab09e57a028853aa9').then(res => {
				this.wgysqzOptions = res.data
			})
		},
		getzydwyjqzOptions()
		{
			previewDataInterface('8bca424f16d6448ab09e57a028853aa9').then(res => {
				this.zydwyjqzOptions = res.data
			})
		},
		getsdqzOptions()
		{
			previewDataInterface('8bca424f16d6448ab09e57a028853aa9').then(res => {
				this.sdqzOptions = res.data
			})
		},

            goBack() {
                this.$emit('refresh')
            },
						// 申请人
						async person(id) {
							this.dataForm.sqr = ''
							const {data} = await departmentPerson({organizeId:id})
							this.personAll = data.list
						},
						// 申请单位
						fullName(val,id) {
							this.person(id)
							this.val = val
							this.dataForm.sqdw = val
						},
						// 数据回填申请单位
						dtaqzyz() {
              let fullName = this.$store.getters.itemData.fullName   
							// 申请单位
							switch (fullName) {
                case '禄口油库动土安全作业证':
                  return this.fullName('禄口油库','0e7420aab60f4d1d9297be06258760e9')
								break;
								case '航空加油站动土安全作业证':
									return this.fullName('航空加油站','aa579f18def44c298497c7a9727fcf76')
								break;
								case '管道中心动土安全作业证':
									return this.fullName('管道中心','0f3b5731aa2f4542a0b143e858c59b66')
								break;
								case '机坪车辆加油站动土安全作业证':
									return this.fullName('机坪车辆加油站','3094a0f6f74d470e9b95dcc406bfcb0f')
								break;
							}
						},
            init(data) {

                this.loading = true
                this.dataForm.id = data.id || ''
                this.setting = data
                this.visible = true;
                this.$nextTick(() => {
                    this.$refs['elForm'].resetFields();
                    if (this.dataForm.id) {
                        request({
                            url: '/api/WorkFlowForm/qyaqscDtzyxx/' + this.dataForm.id,
                            method: 'get'
                        }).then(res => {
                            this.dataForm = res.data
														this.dataForm.sqdw = this.val

                        })
                    } else {
											this.dataForm.flowId = data.flowId
											this.dataForm.sqdw = this.val
                    }
                    this.loading = false
                })
            },
            // 表单提交
            dataFormSubmit(eventType) {            

                this.$refs['elForm'].validate((valid) => {
                    if (valid) {
                        if (eventType === 'audit' || eventType === 'reject') {
                            this.$emit('approval', this.dataForm, eventType)
                            return
                         }
                        this.dataForm.actionType = eventType === 'submit' ? 0 : 1
                        this.eventType = eventType
                        if (this.eventType === 'submit') {
                            if (this.setting.freeApprover == 0) {
                                this.$confirm('您确定要提交当前流程吗, 是否继续?', '提示', {
                                    type: 'warning'
                                }).then(() => {
                                    this.submit()
                                }).catch(() => { });
                            } else {
                                this.userBoxVisible = true
                                this.$nextTick(() => {
                                    this.$refs.userBox.init()
                                })
                            }
                        } else {
                            this.request()
                        }
                    }
                })
            },
            submit(freeApproverUserId) {
                if (freeApproverUserId) this.dataForm.freeApproverUserId = freeApproverUserId
                this.request()
            },
            request() {
                if (!this.dataForm.id) {
                    delete (this.dataForm.id)
                    request({
                        url: '/api/WorkFlowForm/qyaqscDtzyxx',
                        method: 'post',
                        data: this.dataForm
                    }).then((res) => {
                        this.$message({
                            message: res.msg,
                            type: 'success',
                            duration: 1000,
                            onClose: () => {
                                this.visible = false
                                this.$emit('close', true)
                            }
                        })
                    })
                } else {
                    request({
                        url: '/api/WorkFlowForm/qyaqscDtzyxx/' + this.dataForm.id,
                        method: 'PUT',
                        data: this.dataForm
                    }).then((res) => {
                        this.$message({
                            message: res.msg,
                            type: 'success',
                            duration: 1000,
                            onClose: () => {
                                this.visible = false
                                this.$emit('close', true)
                            }
                        })
                    })
                }
            },
            JudgeShow(id) {
                if (!this.setting.formOperates || !this.setting.formOperates.length) return true
                let arr = this.setting.formOperates.filter(o => o.id === id) || []
                if (!arr.length) return true
                let item = arr[0]
                return item.read
            },
            JudgeWrite(id) {
                if (!this.setting.formOperates || !this.setting.formOperates.length) return false
                let arr = this.setting.formOperates.filter(o => o.id === id) || []
                if (!arr.length) return true
                let item = arr[0]
                return !item.write
            },

        },
    }

</script>
